package com.woniu.thread;

/**
 * @author zhaolei
 * @date 2021/5/7 - 19:45
 */
public class threadDemo2 {
    public static void main(String[] args) {
        new Thread(new firstRunable()).start();
        new Thread(new secRunable()).start();
    }
}
class firstRunable implements Runnable{
    public void run() {
        for (int i = 0; i <10 ; i++) {
            System.out.println(Thread.currentThread().getName() + "--第" + (i + 1) + "次执行");
        }
    }
}

class secRunable implements Runnable{
    public void run() {
        for (int i = 0; i < 200; i++) {
            System.out.println(Thread.currentThread().getName() + "--第" + (i + 1) + "次执行");
        }
    }
}
